package com.pearl.mybatis.demo.fluent.entity;

import cn.org.atool.fluent.mybatis.annotation.FluentMybatis;
import cn.org.atool.fluent.mybatis.annotation.TableField;
import cn.org.atool.fluent.mybatis.annotation.TableId;
import cn.org.atool.fluent.mybatis.base.RichEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * UserEntity: 数据映射实体定义
 *
 * @author Powered By Fluent Mybatis
 */
@SuppressWarnings({"rawtypes", "unchecked"})
@Data
@Accessors(
    chain = true
)
@EqualsAndHashCode(
    callSuper = false
)
@AllArgsConstructor
@NoArgsConstructor
@FluentMybatis(
    table = "user",
    schema = "study"
)
public class UserEntity extends RichEntity {
  private static final long serialVersionUID = 1L;

  @TableId(
      value = "user_id",
      desc = "用户ID"
  )
  private Long userId;

  @TableField(
      value = "address",
      desc = "地址"
  )
  private String address;

  @TableField(
      value = "email",
      desc = "邮箱地址"
  )
  private String email;

  @TableField(
      value = "gender",
      desc = "性别"
  )
  private Integer gender;

  @TableField(
      value = "login_name",
      desc = "登录用户名称"
  )
  private String loginName;

  @TableField(
      value = "organization_id",
      desc = "部门-组织ID"
  )
  private Integer organizationId;

  @TableField(
      value = "password",
      desc = "登录密码"
  )
  private String password;

  @TableField(
      value = "phone",
      desc = "手机号"
  )
  private String phone;

  @TableField(
      value = "remark",
      desc = "注释"
  )
  private String remark;

  @TableField(
      value = "state",
      desc = "用户状态"
  )
  private Boolean state;

  @TableField(
      value = "user_name",
      desc = "用户名"
  )
  private String userName;

  @Override
  public final Class entityClass() {
    return UserEntity.class;
  }
}
